In computing systems that execute floating point math instructions, a floating value that may be represented in binary includes a sign bit, a set of exponent bits and a set of significand bits. In general, floating point values are presumed to have a value of ‘1’ for the most significant bit of the significand and the exponent bits are adjusted accordingly, which provides the greatest precision for all of the significand bits. However, when a floating point value is so small that the set of bits of the exponent cannot represent the negative exponent value, leading zeros must be used for one or more of the most significant bits in the set of significand bits. For example, in single precision floating point, the exponent includes a set of eight bits, which may represent a value as small as 2−127. By using leading zeros in the significand, a value smaller than 2−127 may be represented by the single precision floating point bit.
Such floating point values having leading zeros in the significand are generally referred to as denormals or denormal values. Since the vast majority of floating point values are normal (i.e., not denormal), floating point pipelines are designed and optimized to handle normal floating point values. Further, due to area and timing constraints of floating point pipelines and execution units in conventional processors, denormal values generally cannot be handled directly in a floating point pipeline, and must be normalized before they can be handled by a floating point pipeline. When a denormal value is an operand of an instruction, conventional processors generally don't detect the denormal value until the instruction has already been decoded and sent to the floating point pipeline. At that point, such processors are required to normalize the denormal value by storing the instruction in a temporary register, flushing the floating point pipeline, executing microcode to normalize the denormal value operand, and re-issuing the instruction from the temporary register after normalization.
Any time a floating point pipeline is flushed, a significant performance penalty results due to the need to restart the instruction as well as any subsequent operations that were in progress when the pipeline was flushed. In addition, executing microcode to normalize a denormal value operand introduces additional performance penalties, such that when a floating point instruction includes a denormal value operand, a performance penalty of twenty or more processing cycles often occurs. Hence, denormal value operands of floating point instructions are generally heavily penalized in conventional processors.
Therefore, a continuing need exists in the art for improved processing of floating point instructions including a denormal value for an operand.